<?php
include_once dirname(__DIR__).'/third_party/phpcode_shield.php';		//加载防注入代码
include_once dirname(__DIR__).'/libraries/IntConvert.php';		//加载防注入代码
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-12-12
 * Time: 15:19
 */
class Ca extends CI_Controller
{

    /**
     * 构造函数
     */
    function __construct()
    {
        header('Content-Type: text/html; charset=utf-8');
        parent::__construct();
        $this->load->helper('url');
    }

    public function to(){
        $data['base_url'] = base_url();
        if(isset($_GET['code']) && !empty($_GET['code'])){
		$data['wap_url'] = "http://tt.ssxgas.com/y/IDall?code=".$_GET['code'] ."&state=ym_";
	}elseif(isset($_SESSION['WxOpenID']) && !empty($_SESSION['WxOpenID'])){
		$data['wap_url'] = "http://tt.ssxgas.com/y/IDall?code=".$_SESSION['WxOpenID'] ."&state=ym_";
	}else{
		$data['wap_url'] = "http://tt.ssxgas.com/y/ym";
	}
	
	$this->load->view("to",$data);

        
    }

    public function eo($type, $i){
        $i = IntConvert::toInt($i);
        $url = base_url()."f/".$type."?i=".$i."_";
//        var_dump($url);die;
        header("Location: ".$url);
    }

    public function randomKey($i){
        var_dump(IntConvert::toString($i));
        var_dump("123567\t=".       IntConvert::toString(123567));

    }



}